package android_testsuite.mytest.sqlite;

import android.database.sqlite.SQLiteDatabase;

/**
 * Created by renhui on 2015/4/22.
 */
public class SqliteV1 implements SqliteInterface {

    private final String mUserTableCreate =
            "CREATE TABLE IF NOT EXISTS " + Tables.mUser + " ( " +
                    Tables.mUsername + " TEXT NOT NULL," +
                    Tables.mPassword + " TEXT NOT NULL," +
                    " PRIMARY KEY( " + Tables.mUsername + " )); ";

    @Override
    public boolean onCreate(SQLiteDatabase database) {
        database.execSQL(mUserTableCreate);

        // if this class is not Version == 1
        //onUpgrade(database);

        return true;
    }

    @Override
    public boolean onUpgrade(SQLiteDatabase database) {

        // if this class is not Version == 1
        //database.execSQL(mUserTableCreate);
        return true;
    }
}
